﻿/*
 * User: Masy Freddy
 * Date: 20/09/2011
 * Time: 12:23
 */

namespace MetaVideoEditorEvolved.AddIn.AddInAdapters
{
	using System;
	using System.AddIn.Pipeline;
	using MetaVideoEditorEvolved.AddIn.AddInViews;
	using MetaVideoEditorEvolved.AddIn.Contracts;

	[AddInAdapter]
	public class SaverAdapter: ContractBase, ISaverContract
	{
		private SaverView view;

		public SaverAdapter(SaverView view)
		{
			this.view = view;
		}
		
		public void SaveMovie(string mediaLocation, MetaVideoEditorEvolved.AddIn.Entity.Movie movie)
		{
			this.view.SaveMovie(mediaLocation, movie);
		}
		
		public void SaveSerie(string mediaLocation, MetaVideoEditorEvolved.AddIn.Entity.Serie serie)
		{
			this.view.SaveSerie(mediaLocation, serie);
		}
		
		public void SaveSeason(string mediaLocation, MetaVideoEditorEvolved.AddIn.Entity.Season season)
		{
			this.view.SaveSeason(mediaLocation, season);
		}
		
		public void SaveEpisode(string mediaLocation, MetaVideoEditorEvolved.AddIn.Entity.Episode episode)
		{
			this.view.SaveEpisode(mediaLocation, episode);
		}
		
		public void ShowOption()
		{
			AppDispatcher.Current.DoWork(delegate()
			                             {
			                             	this.view.ShowOption();
			                             });
		}
		
		public bool HasOption()
		{
			return this.view.HasOption();
		}
	}
}
